package com.song.shop.niuke;

import java.util.Scanner;

public class Main02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num1 = scanner.nextInt();
        int num2 = scanner.nextInt();

        int start = Math.min(num1, num2);
        int end = Math.max(num1,num2);

        for(; start <= end; start++ ){
            if (start % (3 * 5) == 0){
                System.out.println("foobar");
            }else if (start % 5 == 0){
                System.out.println("bar");
            }else if (start % 3 == 0){
                System.out.println("foo");
            }else {
                System.out.println(start);
            }
        }
    }
}
